<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>CCT Dynamic Strings</title>
		<style type="text/css">
			table {
				border: 1px #000000 solid;
				border-collapse: collapse;
			}
			td {
				border: 1px #000000 solid;
			}
			td.title {
				font-weight: bold;
				border: 5px #000000 solid;
			}
		</style>
	</head>
	<body>
		<h1>CCT Dynamic Strings</h1>
		
		<h2>CCT Documentation</h2>
		<ul>
			<li><a href="readme.html">CCT Readme</a></li>
			<li><a href="readme.html#gui">XML GUI</a>
				<ul>
					<li><a href="actions.html">CCT Actions</a></li>
					<li><a href="persistentcomponents.html">CCT Persistent Components</a></li>
					<li><a href="dynamicstrings.html">CCT Dynamic Strings</a></li>
				</ul>
			</li>
		</ul>
		
		<p>All of the text in CCT is formatted as dynamic strings. Dynamic strings can be used as
		plaintext, but can also access statistics that CCT keeps track of. Using dynamic strings,
		you can get CCT to display just the information that you are interested in.
		<p>Here's a simple example: "Your best time: $$besttime$$". If your best time is 15.77 seconds, this
		will be formatted by CCT as "Your best time: 15.77". However, to make it easy to translate your xml layout,
		you can externalize the "Your best time" string as well. The dynamic string would then become "%%besttimemessage%%: $$besttime$$.
		If your layout is called "My Awesome Layout.xml", then you must also create "My Awesome Layout.properties" containing this line:
		"besttimemessage=Your best time". NOTE: This will not work if your xml layout file contains more than one period.
		See <a href="readme.html#i18n">CCT Readme</a> for a more detailed description of properties files
		and internationalization.</p>
		
		What follows is a list of all the $$ properties accessible within CCT.
		As described above, to distinguish the keys from plaintext, surround them with $$ and $$, for example: $$pops$$. To print "$$pops$$" as
		plaintext, just use "\$\$pops\$\$"
		Some keys may require a numeric argument specifying which RA you are interested in. Remember that CCT keeps
		track of all the statistics for two rolling average lengths. For example, to get the latest 
		average for a given RA number, use $$currentAverage0$$ or $$currentAverage1$$. For any key ending in #,
		the # should be replaced with the number of the desired RA.</p>
		<p>NOTE: Standard deviations for trimmed (rolling) averages are computed over only the solves included in the average.<br />
		FURTHER NOTE: Capitalization of the $$ keywords does not matter.</p>
		
		<table>
			<tr>
				<td class="title">$$ Keyword</td>
				<td class="title">Description</td>
			</tr>
			<tr>
				<td>session.average</td>
				<td>This will be replaced with the average of all non infinite solves in the times list (current session).</td>
			</tr>
			<tr>
				<td>session.sd</td>
				<td>This is the standard deviation of all non infinite solves in the current session.</td>
			</tr>
			<tr>
				<td>session.time(progress)</td>
				<td>The difference between the most recent solve and the solve before it.</td>
			</tr>
			<tr>
				<td>ra(#).progress</td>
				<td>The difference between the most recent RA # and the previous RA #.</td>
			</tr>
			<tr>
				<td>session.time(progress)|parens</td>
				<td>This formats session.time(progress) between parenthesis, and will be an empty string if the difference was infinite.</td>
			</tr>
			<tr>
				<td>ra(#).progress|parens</td>
				<td>see session.time(progress)|parens</td>
			</tr>
			<tr>
				<td>session.time(best)</td>
				<td>This is the best time in the current session, or N/A if there are no solves.</td>
			</tr>
			<tr>
				<td>ra(#).size</td>
				<td>The is the size of RA #.</td>
			</tr>
			<tr>
				<td>ra(#, best)</td>
				<td>The is the best rolling average of RA #.</td>
			</tr>
			<tr>
				<td>ra(#, best).sd</td>
				<td>This is the standard deviation of the best average of RA #.</td>
			</tr>
			<tr>
				<td>ra(#).sd(best)</td>
				<td>The is the best standard deviation of RA #. Not necessarily the same as ra(#, best).sd, for example, you could have
				a slower average with very little variation.</td>
			</tr>
			<tr>
				<td>session.time(worst)</td>
				<td>This is the worst, finite time in the current session.</td>
			</tr>
			<tr>
				<td>ra(#, worst)</td>
				<td>This is the worst average of RA #.</td>
			</tr>
			<tr>
				<td>ra(#, worst).sd</td>
				<td>The standard deviation of the worst average in RA #.</td>
			</tr>
			<tr>
				<td>ra(#).sd(worst)</td>
				<td>This is the worst standard deviation of all rolling averages in RA #.</td>
			</tr>
			<tr>
				<td>session.time(recent)</td>
				<td>The most recent time.</td>
			</tr>
			<tr>
				<td>ra(#, recent)</td>
				<td>The current average of RA #.</td>
			</tr>
			<tr>
				<td>ra(#, recent).sd</td>
				<td>The standard deviation of the current average of RA #.</td>
			</tr>
			<tr>
				<td>session.time(last)</td>
				<td>This is the time before the session.time(recent).</td>
			</tr>
			<tr>
				<td>ra(#, last)</td>
				<td>This is the 2nd most recent average of RA #.</td>
			</tr>
			<tr>
				<td>ra(#, last).sd</td>
				<td>This is the standard deviation of the average in lastAverage#.</td>
			</tr>
			<tr>
				<td>ra(#, recent).time(best)</td>
				<td>The best time of the most recent RA #.</td>
			</tr>
			<tr>
				<td>ra(#, recent).time(worst)</td>
				<td>Straightforward.</td>
			</tr>
			<tr>
				<td>ra(#, best).time(best)</td>
				<td>Straightforward.</td>
			</tr>
			<tr>
				<td>ra(#, best).time(worst)</td>
				<td>Straightforward.</td>
			</tr>
			<tr>
				<td>ra(#, worst).time(best)</td>
				<td>Straightforward.</td>
			</tr>
			<tr>
				<td>ra(#, worst).time(worst)</td>
				<td>Straightforward.</td>
			</tr>
			<tr>
				<td>session.average.progress</td>
				<td>This is the difference between the current session average and the one before it.</td>
			</tr>
			<tr>
				<td>session.sd.progress</td>
				<td>This is the difference between the SD of the current session and the one before it.</td>
			</tr>
			<tr>
				<td>session.average.progress|parens</td>
				<td>This formats progressAverageSD nicely.</td>
			</tr>
			<tr>
				<td>session.sd.progress|parens</td>
				<td>This formats progressSessionSD nicely.</td>
			</tr>
			
			<tr>
				<td>ra(#, best).list</td>
				<td>A comma separated list of the times in the best average of RA #. The best and worst times are
				surrounded with parenthesis.</td>
			</tr>
			<tr>
				<td>ra(#, recent).list</td>
				<td>see ra(#, best).list</td>
			</tr>
			<tr>
				<td>session.list</td>
				<td>see ra(#, best).list</td>
			</tr>
			<tr>
				<td>ra(#, worst).list</td>
				<td>see bestAverageList#</td>
			</tr>
			
			<tr>
				<td>ra(#, best).stats</td>
				<td>This enumerates the times of the best average of RA #, and appends their scramble and comment.</td>
			</tr>
			<tr>
				<td>ra(#, recent).stats</td>
				<td>see ra(#, best).stats</td>
			</tr>
			<tr>
				<td>session.stats</td>
				<td>see ra(#, best).stats</td>
			</tr>
			<tr>
				<td>ra(#, best).stats|splits</td>
				<td>This enumerates the times of the best average of RA #, and appends their scramble, splits, and comment.</td>
			</tr>
			<tr>
				<td>ra(#, recent).stats|splits</td>
				<td>see ra(#, best).stats|splits</td>
			</tr>
			<tr>
				<td>session.stats|splits</td>
				<td>see ra(#, best).stats|splits</td>
			</tr>
			
			<tr>
				<td class="title"></td>
				<td class="title">The following allow access to global statistics. That is, statistics about every solve you have ever
				done of the current scramble customization.</td>
			</tr>
			<tr>
				<td>global.time(best)</td>
				<td>This is the best time of all the sessions of the current scramble customization.</td>
			</tr>
			<tr>
				<td>global.ra(#, best)</td>
				<td>The best RA of RA # of all the sessions of the current scramble customization.</td>
			</tr>
			<tr>
				<td>global.average</td>
				<td>The average of all solves of all the sessions of the current scramble customization.</td>
			</tr>
			
			<tr>
				<td class="title"></td>
				<td class="title">Misc</td>
			</tr>
			<tr>
				<td>date</td>
				<td>This is the current date and time. This will not be updated every second.</td>
			</tr>
			
			<tr>
				<td class="title"><a name="tags" /></td>
				<td class="title">Solve tags and counts. SOLVETAG can be any of SOLVED, ATTEMPT, POP, DNF, +2, 
				or any solve tags defined within CCT. See the <a href="readme.html#tags">Readme</a> for more details.</td>
			</tr>
			<tr>
				<td>session.solvecount(SOLVETAG)</td>
				<td>This is a count of the number of solves of type SOLVETAG in the current session.</td>
			</tr>
			<tr>
				<td>global.solvecount(SOLVETAG)</td>
				<td>This is a global count of the number of solves of type SOLVETAG.</td>
			</tr>
		</table>
	</body>
</html>
